<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>EasyTalk Administrator's Control Panel</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta content="H.Joeson" name="Copyright" />
		<link rel="stylesheet" href="<{$res}>/css/style.css" type="text/css" media="all" />
		<script src="<{$res}>/js/jquery.js" type="text/javascript"></script>
		<script src="<{$res}>/js/admin.js" type="text/javascript"></script>
	</head>
	<body>
		<div id="bodymain">
			<div class="title"> </div>
			<div class="content">
				<h3>友情链接</h3>
					<table class="table" style="margin:5px 0 20px 0">
						<tr>
							<td width="20px"><b>显示位置</b></td>
							<td width="20px"><b>站点名称</b></td>
							<td width="20px"><b>站点URL地址</b></td>
							<td><b>是否可用</b></td>
						</tr>
						<{foreach $result as $list}>
						<tr>
							<td><input type="text" value="<{$list['position']}>" class="txt_input" style="width:120px"></td>
							<td><input type="text" value="<{$list['text']}>" class="txt_input" style="width:120px"></td>
							<td><input type="text" value="<{$list['link']}>" class="txt_input" style="width:120px"></td>
							<td align="left"><input type="checkbox" value=" " <{if $list['status'] eq 0}> checked <{/if}>  class="checkbox"></td>
						</tr>
						<{/foreach}>
						<form action='<{$url}>/doFlink' method="POST">
						<tr>
							<td><input type="text" name="position[]" value="" class="txt_input" style="width:120px"></td>
							<td><input type="text" name="text[]" value="" class="txt_input" style="width:120px"></td>
							<td><input type="text" name="link[]" value="" class="txt_input" style="width:120px"></td>
							<td align="left"><input type="checkbox" name="status[]" value="0" class="checkbox"></td>
						</tr>
						<tr id="addbtn">
							<td colspan="3"><a href="javascript:void(0)" onclick="addflink()">+ 添加</a></td>
						</tr>
						<tr>
							<td colspan="3"><input type="submit" class="button1" value="提交保存"></td>
						</tr>
						</form>
					</table>
				<script type="text/javascript">
					function addflink() {
						$('#addbtn').before('<tr><td><input type="text" name="position[]" value="" class="txt_input" style="width:120px"></td> <td><input type="text" name="text[]" value="" class="txt_input" style="width:120px"></td> <td><input type="text" name="link[]" value="" class="txt_input" style="width:120px"></td> <td align="left"><input type="checkbox" name="status[]" value="" class="checkbox"></td></tr>');
					}
					
					//上传设置
					function subflink(position,text,link,status) {
						alert(position,text,link,status);
						$.ajax({
							type:"POST",
							url:"<{$url}>/doFlink",
							data:"position="+position+"&text="+text+"&link="+link+"&status="+status,
							success:function(){
							
							
							}
								
						});
					}
				</script>
			</div>
		</div>
	</body>
</html>
